Conversation
Coverage Report for CI Build 36714503582Coverage decreased (-0.05%) to 73.827%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions69 previously-covered lines in 4 files lost coverage.
Coverage Stats💛 - Coveralls |
There was a problem hiding this comment.
The default native package installation is implemented in GlobalToolCommandlet#getInstallPackageManagerCommands. It retrieves the native packages defined by the tool and passes the resolved IDEasy version to each package installation:
IDEasy/cli/src/main/java/com/devonfw/tools/ide/tool/GlobalToolCommandlet.java
Lines 201 to 204 in f145266
This behavior works for packages that are installed from a package repository such as Rancher Desktop. The package name and resolved version can be combined to create a version specific package.
For APT, NativePackageManager#getPackageSpec creates this package specification by appending the resolved version and a wildcard to the package name:
For a regular repository package, this produces a valid package:
rancher-desktop=1.20.0*
Docker Desktop requires a different installation because it is distributed as a separate Debian package. Applying the default version logic to a downloaded local file would produce an invalid APT argument:
/tmp/docker-desktop-amd64.deb=4.34.0*
278ea7a to
527d379
Compare
hohwille
left a comment
There was a problem hiding this comment.
@Hiepiscus thanks for your PR and analysing the problem and finding a solution. 👍
Seems that Linux is making our life quite complex.
I was also thinking of a way to avoid that state in downloadedDebPackageForDocker that could later cause evil side-effect but downloading this whenever getNativePackages() gets called seems even more evil in case the method might get called multiple times... So I cannot suggest anything cleaner on that...
Please resolve the merge conflict and add the issue now to the changelog - I assigned the release as milestone.
| */ | ||
| public NativePackage(NativePackageManager pm, List<String> packages, | ||
| List<String> extraInstallOptions, List<String> setupCommands, List<String> cleanupCommands) { | ||
| List<String> extraInstallOptions, List<String> setupCommands, List<String> cleanupCommands, List<String> optionalNativePackageArtifactPaths) { |
There was a problem hiding this comment.
Why using List<String> instead of List<Path>?
If you always keep a legacy constructor with the old signature passing to the new constructor, you can avoid changes in other files where this new parameter is not needed keeping your diff smaller.
Also you reduce git merge conflicts for other developers working on similar things in parallel:
https://github.com/devonfw/IDEasy/blob/main/documentation/contributing/coding-conventions.adoc#refactorings
(3. point - is taking about method but a constructor is the same manner here)
|
|
||
| @Override | ||
| protected List<PackageManagerCommand> getInstallPackageManagerCommands(VersionIdentifier resolvedVersion) { | ||
| if (!EDITION_DOCKER.equals(getConfiguredEdition())) { |
There was a problem hiding this comment.
nice to have:
if you are repeating this condition 3 times, you could create a private method isDockerDesktopEditionConfigured().
527d379 to
81ed4d6
Compare
This PR fixes #2345
On Linux, setting
DOCKER_EDITION=dockerhad no effect because the Docker Desktop URL metadata did not contain a Linux download URL. As a result, Docker Desktop could not be selected and Rancher Desktop was installed instead.While adding Linux support, the Docker Desktop URL updater also had to be adjusted because the previous release notes URL no longer provided the expected content.
Docker Desktop installation on Linux
Docker Desktop requires a different installation than Rancher Desktop. Rancher Desktop is available as a package from its configured package repository and can therefore be installed directly by its package name.
Docker Desktop, however is distributed as a separate Debian package. According to the official Docker Desktop , the Docker package repository must first be configured, the Docker Desktop
.debpackage must then be downloaded separately, and finally the local package must be installed using:Implemented changes:
DockerDesktopUrlUpdaterDocker.javato resolve thedockeredition on Linux whenDOCKER_EDITION=dockeris configured.docs.docker.com/desktop/release-notestodocs.docker.com/desktop/release-notes.md.ToolRepository..debfiledocker-desktopas the native package name for version detection and uninstallation.Testing instructions
urls-statusdirectory and clone theide-urls-statusrepository:git clone https://github.com/devonfw/ide-urls-status.git <path-to-ide-urls-status>UpdateInitiator <path-to-ide-urls> <path-to-ide-urls-status> PT1H dockeride set-edition docker dockeride install dockerdpkg-query -W docker-desktopide uninstall dockerdpkg-query -W docker-desktopChecklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.batand notfeature/921 fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internalpom.xmlfiles or otherwise if runtime dependencies changed, you have updated our LICENSE.asciidoc